package grape.wx.rest.client.user;

import grape.common.service.trans.ITransService;
import grape.wx.service.mp.user.po.MpUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by yangwei
 * Created at 2020/7/28 18:47
 */
@Component
@FeignClient(value = "grape-wx")
public interface MpUserClient extends ITransService<String,String> {

    @GetMapping(value = "/wx/mpuser/inner/trans")
    @Override
    public String trans(@RequestParam String type,@RequestParam String key);

    @GetMapping(value = "/wx/mpuser/inner/trans/support")
    @Override
    public boolean support(@RequestParam String type);

    @GetMapping(value = "/wx/mpuser/inner/getByOpenidAndAppCode")
    public MpUser getByOpenidAndAppCode(@RequestParam String openId,@RequestParam String appCode);

    @GetMapping(value = "/wx/mpuser/inner/getById")
    public MpUser getById(@RequestParam String id);


    @GetMapping(value = "/wx/mp/oauth2/{appId}/oauth2getUserInfo")
    public MpUser oauth2getUserInfo(@PathVariable String appId,@RequestParam String code);


}
